package com.yanqu.road.entity.log;

import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Date;

@FieldTypeAnnotation(tableName = "t_l_ck_delete_mail", desc = "邮件删除", autoSave = true, uploadCk = true)
public class LogDeleteMail extends ServerBaseLog {

    @FieldTypeAnnotation(desc = "邮件唯一标识")
    private String mailUid;
    @FieldTypeAnnotation(desc = "邮件类型")
    private int mailType;
    @FieldTypeAnnotation(desc = "邮件标题")
    private String title;
    @FieldTypeAnnotation(desc = "邮件内容")
    private String content;
    @FieldTypeAnnotation(desc = "附件")
    private String annexes;
    @FieldTypeAnnotation(desc = "发送时间")
    private Date sendTime;
    @FieldTypeAnnotation(desc = "发送人")
    private long sendUserId;
    @FieldTypeAnnotation(desc = "发送人名字")
    private String sendNickName;
    @FieldTypeAnnotation(desc = "接收人", isIndex = true)
    private long receiveUserId;
    @FieldTypeAnnotation(desc = "是否已读")
    private boolean isRead;
    @FieldTypeAnnotation(desc = "阅读时间")
    private Date readTime;
    @FieldTypeAnnotation(desc = "是否领取奖励")
    private boolean isGetReward;
    @FieldTypeAnnotation(desc = "是否删除邮件")
    private boolean isDelete;

    public LogDeleteMail(String mailUid, int mailType, String title, String content, String annexes, Date sendTime, long sendUserId, String sendNickName, long receiveUserId, boolean isRead, Date readTime, boolean isGetReward, boolean isDelete) {
        this.mailUid = mailUid;
        this.mailType = mailType;
        this.title = title;
        this.content = content;
        this.annexes = annexes;
        this.sendTime = sendTime;
        this.sendUserId = sendUserId;
        this.sendNickName = sendNickName;
        this.receiveUserId = receiveUserId;
        this.isRead = isRead;
        this.readTime = readTime;
        this.isGetReward = isGetReward;
        this.isDelete = isDelete;
    }

    @Override
    public long getUserId() {
        return receiveUserId;
    }
}
